package com.happly.happlycloud.service;

import com.github.pagehelper.PageInfo;
import com.happly.happlycloud.common.ServerResponse;
import com.happly.happlycloud.pojo.User;
import com.happly.happlycloud.vo.UserDetailVo;

import java.util.Map;


public interface IUserService {

    ServerResponse<User> login(String username, String password);

    ServerResponse<String> register(User user);

    ServerResponse<String> checkValid(String str,String type);

    ServerResponse selectQuestion(String username);

    ServerResponse<String> checkAnswer(String username,String question,String answer);

    ServerResponse<String> forgetResetPassword(String username,String passwordNew,String forgetToken);

    ServerResponse<String> resetPassword(String passwordOld,String passwordNew,User user);

    ServerResponse<User> updateInformation(User user);

    ServerResponse<User> getInformation(Integer userId);

    ServerResponse<Map> getStateInformation(Integer userId);

    ServerResponse checkAdminRole(User user);

    ServerResponse checkToturRole(User user);

    ServerResponse<PageInfo> searchUser(String userName,Integer userId,String email,String phone, int pageNum, int pageSize);

    ServerResponse<PageInfo> getUserList(int pageNum, int pageSize);

    ServerResponse setUserRole(Integer userId, Integer role, int pageNum, int pageSize);

    ServerResponse<UserDetailVo> manageUserDetail(Integer userId);

    ServerResponse frose(Integer userId, int pageNum, int pageSize);

    ServerResponse unfrose(Integer userId, int pageNum, int pageSize);

    ServerResponse saveOrUpdateUser(User userMessage);



    ServerResponse getAllCount();

    ServerResponse getTutorCount(Integer id);
}
